package first.demo;

public class studentAndTeacher {
    public static void main(String[] args) {
        String name="zs";
        int age=18;
        String thing_like="game";
        student student1 = new student("zs",18,"game");
        student1.display();
       teacher teacher1 = new teacher("ls",48,"reading");
       teacher1.display();

    }
}
class student {
    String name;
    int age;
    String thing_like;
    public  student(String name,int age, String thing_like){
        this.name=name;
        this.age=age;
        this.thing_like=thing_like;
    }

    public void display(){
        System.out.println("student name:"+name+"\n"+"age:"+age+"\n"+"thing_like:"+thing_like);
    }
}
class teacher {
        String name;
        int age;
        String thing_like;
        public  teacher(String name,int age, String thing_like){
            this.name=name;
            this.age=age;
            this.thing_like=thing_like;
        }

        public void display(){
            System.out.println("teacher name:"+name+"\n"+"age:"+age+"\n"+"thing_like:"+thing_like);
        }
    }